<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateVentaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    
                    <h:outputLabel value="#{bundle.CreateVentaLabel_cantidadVenta}" for="cantidadVenta" />
                    <h:inputText id="cantidadVenta" value="#{ventaController.selected.cantidadVenta}" title="#{bundle.CreateVentaTitle_cantidadVenta}" required="true" requiredMessage="#{bundle.CreateVentaRequiredMessage_cantidadVenta}"/>
                    <h:outputLabel value="#{bundle.CreateVentaLabel_montoVenta}" for="montoVenta" />
                    <h:inputText id="montoVenta" value="#{ventaController.selected.montoVenta}" title="#{bundle.CreateVentaTitle_montoVenta}" required="true" requiredMessage="#{bundle.CreateVentaRequiredMessage_montoVenta}"/>
                    <h:outputLabel value="#{bundle.CreateVentaLabel_iva10}" for="iva10" />
                    <h:inputText id="iva10" value="#{ventaController.selected.iva10}" title="#{bundle.CreateVentaTitle_iva10}" required="true" requiredMessage="#{bundle.CreateVentaRequiredMessage_iva10}"/>
                    <h:outputLabel value="#{bundle.CreateVentaLabel_fechaVenta}" for="fechaVenta" />
                    <h:inputText id="fechaVenta" value="#{ventaController.selected.fechaVenta}" title="#{bundle.CreateVentaTitle_fechaVenta}" required="true" requiredMessage="#{bundle.CreateVentaRequiredMessage_fechaVenta}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateVentaLabel_usuario}" for="usuario" />
                    <h:selectOneMenu id="usuario" value="#{ventaController.selected.usuario}" title="#{bundle.CreateVentaTitle_usuario}" required="true" requiredMessage="#{bundle.CreateVentaRequiredMessage_usuario}">
                        <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateVentaLabel_producto}" for="producto" />
                    <h:selectOneMenu id="producto" value="#{ventaController.selected.producto}" title="#{bundle.CreateVentaTitle_producto}" required="true" requiredMessage="#{bundle.CreateVentaRequiredMessage_producto}">
                        <f:selectItems value="#{productoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateVentaLabel_cliente}" for="cliente" />
                    <h:selectOneMenu id="cliente" value="#{ventaController.selected.cliente}" title="#{bundle.CreateVentaTitle_cliente}" required="true" requiredMessage="#{bundle.CreateVentaRequiredMessage_cliente}">
                        <f:selectItems value="#{clienteController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{ventaController.create}" value="#{bundle.CreateVentaSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{ventaController.prepareList}" value="#{bundle.CreateVentaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateVentaIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
